The present invention relates to the re-encoding of decoded signals, particularly analogue or analogue-type signals, and finds particular application to audio signals, but can also be applied to video signals.
Digitisation of analogue signals in signal transmission systems is well established. Digitisation was originally introduced primarily to reduce the effects of noise. However, it is often important to minimize the bandwidth occupied by the signal. Techniques for processing of the digitised signals to reduce the quantity of information to be transmitted have therefore been developed, and can be of considerable complexity. These techniques are generally described as coding systems.
The encoding and decoding of a signal results in a loss of information. Broadly speaking, the greater the bandwidth (bit rate) and the greater the processing power available for the encoding and decoding, the closer the decoded signal is to the original. The difference between the original and decoded signals can be termed coding noise.
Coding systems are designed to minimize the impairment (loss) of perceived quality. For audio compression, for example, the term xe2x80x9cpsycho-acoustic codingxe2x80x9d had been used for high compression coding systems which adapt the signal precision to the human ear""s acuity. If the system is well designed, the coding noise will be substantially imperceptible, masked by the desired signal.
A considerable number of techniques for coding audio signals have been developed. In a video signal system in which the video signal is digitised and compressed, there will usually be an accompanying audio signal; this audio signal will need to be digitised, and it may be desirable to compress it as well. Standard techniques for compressing video signals are well known, for example MPEG coding (which itself has several variations or levels).
It is obviously necessary for the audio compression technique to be compatible with the MPEG video compression system. But the MPEG standard includes a considerable variety of audio coding layers and levels. In MPEG-1 and MPEG-2, there are 3 layers, with the coding complexity increasing from payer 1 to layer 3. Also, in MPEG-1, there are 3 possible sampling rates and several modes (mono, stereo, dual mono, etc); in MPEG-2, there are 6 sampling rates and more modes (including multi-channel modes).
Which coding systems are implemented at different signal coding stations depends on the particular circumstances at the different stations. If a particular station is designed to deal with only one or a few specific types of signal, then the specific types of coding (for both video and audio signals) required for those types of signal may be implemented. Often, however, a station may implement a wide range of coding systems, with the particular coding system used being selected according to the requirements of the signal being coded and changed as those requirements change. Thus, there are several basic sets of coding systems which may be applied to a particular signal. In addition, the coding parameters or coding decisions associated with a given signal may change dynamically. Whilst the basic coding scheme can often be specified in such a way that it is applied uniformly at different coders, the dynamic coding decisions may not necessarily be performed in the same way from one coder to another.
It is often necessary to transmit coded signals through a chain of several stages (xe2x80x9chopsxe2x80x9d). The different stages may have different signal handling characteristics, and/or the coupling between the different stages may be relatively primitive. This may result in the signal having to be decoded as it leaves one stage and re-encoded as it enters the next stage. Similarly, a station may be required to process the signals passing through it, e.g. for mixing or merging. This also in general requires the incoming signals to be decoded before they are processed and re-encoded for onward transmission.
It is well recognized that in general, such decoding and re-encoding results in a loss of quality. As discussed above, the original encoding and decoding introduces coding noise, so the input for the second coding will consist of the original signal plus that coding noise. The second coding will introduce its own coding noise, so the output from the second coding will contain two lots of coding noise, and so on. The coding noise can easily accumulate to the point where it becomes apparent, audible (in the case of audio) or visible (in the case of video), producing a noticeable loss of quality.
The general object of the present invention is to reduce the loss of quality occurring in such cascaded decoding and re-encoding.
The invention has evolved from the recognition that, when the two coding systems are identical, then if the re-encoding uses exactly the same parameters as the original encoding, the second coding system will introduce virtually no coding noise beyond that already introduced by the first coding system.
According to one aspect of the present invention there is provided encoding apparatus for encoding an input signal comprising encoding means for performing a plurality of different encodings, analysing means for analysing the signal to detect characteristics of a previous coding, and selection means for selecting the type of encoding performed according to the results of the analysis.
According to another aspect, the invention provides a method of encoding a signal comprising analysing the signal to detect characteristics of a previous coding and encoding the signal accordingly.
In simple versions of the invention, the input signal may be a true analogue signal. However, the input signal may be a xe2x80x9cnear-analoguexe2x80x9d signal, ie a signal which has been partially decoded but is still in digital form, for example a pulse code modulation (PCM) signal, or an uncompressed digital bitstream.
The component of the signal subject to coding could simply be the signal itself. This would be the case in a companding system such as NICAM. Alternatively the component could be derived from a transform of the original signal. Examples are a time-to-frequency transform of an audio signal or a discrete cosine transform of an image.
The invention can advantageously be applied to the coding of audio signals within the MPEG standards, where a variety of different codings may be used for the audio signal.
The invention may be applied to analyse the incoming signal initially, determine appropriate coding parameters and then re-code the signal for a prolonged period using those parameters. More preferably, the invention is employed to analyse the signal dynamically, that is while coding is in progress and to re-estimate the coding parameters regularly or quasi-continuously. In particular, in the case of re-coding a previously compressed signal (the preferred application) such as a video or audio signal, the coding parameters will change frequently as the signal changes to provide efficient encoding. Therefore, the analysis is preferably performed (quasi-)continuously, preferably to determine a set of coding parameters for each sequential block of data (for example a block of MPEG audio or a video frame of video group of pictures).
It is to be appreciated that it may not always be possible to replicate previous coding exactly, particularly where the signal has been processed in decoded form, but by taking into account, and to some extent following, estimated previous coding decisions, it is found that the amount of coding noise introduced in re-coding is normally less than if re-coding were performed without analysis, and in many cases a significant improvement results.
Other aspects and preferred features are set out in the claims to which reference should be made.